package javafx179labs.gusev.lab1;

import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.shape.Circle;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;
import javafx.scene.transform.Rotate;
import javafx.scene.shape.Line;
import javafx.scene.shape.Arc;
import javafx.scene.shape.ArcType;
import javafx.scene.shape.Polygon;
import javafx.scene.shape.Ellipse;
import javafx.scene.effect.light.PointLight;
import javafx.scene.effect.Lighting;

Stage
{
    title: "Portal"
    width: 900
    height: 900
    scene: Scene
    {
        fill: Color.BLACK
        content:
        [
            Rectangle
            {
                x: 0
                y: 0
                width: 900
                height: 900
                fill: Color.BLACK
                effect: Lighting
                {
                    light: PointLight
                    {
                        x: 450
                        y: 350
                        z: 700
                    }
                }
            }

            Circle
            {
                centerX: 374
                centerY: 122
                radius: 57
                fill: Color.LIGHTGRAY
            }

            Rectangle
            {
                x: 325
                y: 185
                width: 95
                height: 150
                fill: Color.LIGHTGRAY
                transforms:
                [
                    Rotate
                    {
                        pivotX : 374
                        pivotY : 123
                        angle: -48
                    }
                ]
            }

            Line
            {
                startX: 502
                startY: 100
                endX: 405
                endY: 203
                strokeWidth: 35
                stroke: Color.LIGHTGRAY
            }

            Line
            {
                startX: 535
                startY: 98
                endX: 596
                endY: 148
                strokeWidth: 35
                stroke: Color.LIGHTGRAY
            }

            Circle
            {
                centerX: 518
                centerY: 85
                radius: 18
                fill: Color.LIGHTGRAY
            }

            Circle
            {
                centerX: 605
                centerY: 155
                radius: 18
                fill: Color.LIGHTGRAY
            }

            Line
            {
                startX: 393
                startY: 225
                endX: 386
                endY: 258
                strokeWidth: 35
                stroke: Color.LIGHTGRAY
            }

            Line
            {
                startX: 375
                startY: 279
                endX: 338
                endY: 314
                strokeWidth: 35
                stroke: Color.LIGHTGRAY
            }

            Circle
            {
                centerX: 322
                centerY: 330
                radius: 18
                fill: Color.LIGHTGRAY
            }

            Line
            {
                startX: 557
                startY: 250
                endX: 620
                endY: 305
                strokeWidth: 35
                stroke: Color.LIGHTGRAY
            }

            Line
            {
                startX: 636
                startY: 305
                endX: 652
                endY: 255
                strokeWidth: 35
                stroke: Color.LIGHTGRAY
            }

            Arc
            {
                centerX: 656
                centerY: 255
                radiusX: 20
                radiusY: 30
                startAngle: 18
                length: 120
                type: ArcType.OPEN
                fill: Color.LIGHTGRAY
            }

            Arc
            {
                centerX: 633
                centerY: 309
                radiusX: 20
                radiusY: 25
                startAngle: 230
                length: 150
                type: ArcType.OPEN
                fill: Color.LIGHTGRAY
            }

            Line
            {
                startX: 534
                startY: 260
                endX: 500
                endY: 360
                strokeWidth: 35
                stroke: Color.LIGHTGRAY
            }

            Line
            {
                startX: 515
                startY: 260
                endX: 497
                endY: 360
                strokeWidth: 35
                stroke: Color.LIGHTGRAY
            }

            Line
            {
                startX: 506
                startY: 390
                endX: 565
                endY: 440
                strokeWidth: 35
                stroke: Color.LIGHTGRAY
            }

            Arc
            {
                centerX: 516
                centerY: 380
                radiusX: 40
                radiusY: 25
                startAngle: 120
                length: 140
                type: ArcType.OPEN
                fill: Color.LIGHTGRAY
            }

            Arc
            {
                centerX: 574
                centerY: 448
                radiusX: 18
                radiusY: 18
                startAngle: 245
                length: 150
                type: ArcType.OPEN
                fill: Color.LIGHTGRAY
            }

            Rectangle
            {
                x: 433
                y: 487
                width: 64
                height: 63
                fill: Color.LIGHTGRAY
            }

            Ellipse
            {
                centerX: 466
                centerY: 656
                radiusX: 240
                radiusY: 40
                stroke: Color.BLUE
                strokeWidth: 20
            }
            
            Polygon
            {
                points : [ 388,550, 466,656, 543,550 ]
                fill: Color.LIGHTGRAY
            }
        ]
    }
}